package com.umanji.security.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.PrePersist;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;

import org.hibernate.annotations.Cascade;

import com.umanji.generic.entity.UUIDEntity;
import com.umanji.user.domain.Members;


@Entity
public class Authorities implements Serializable {

	@Id
	@OneToOne(cascade = CascadeType.ALL)
	@JoinColumn(name="USERNAME", referencedColumnName="USERNAME")
	private Users user;

	private String authority;

	public Authorities() {
		// TODO Auto-generated constructor stub
	}

    public Authorities(String authority) {
        this.authority = authority;
    }

    public Authorities(Users user, String authority) {
        this.user = user;
        this.authority = authority;
    }

	public Users getUser() {
		return user;
	}

	public void setUser(Users user) {
		this.user = user;
	}

	public String getAuthority() {
		return authority;
	}

	public void setAuthority(String authority) {
		this.authority = authority;
	}

}
